<template>
  <div>
    <div class="equipContainner">
      <el-row :gutter="20" class="seachnav">
        <el-col :xs="7" :sm="6" :md="4" :lg="6" :xl="3" class="navHeight">
          <span @click="goBack()" class="returnnormalpress"></span>
          <span><img :src="history" class="equiplist"/></span>
          <span v-show="false" @click="searchShow()" class="searchinvalid"></span>
        </el-col>
        <el-col :xs="7" :sm="6" :md="18" :lg="18" :xl="21" class="con" >
          <p  class="seachContent">{{this.seachContent}}</p>
        </el-col>
      </el-row>
    </div>
    <div class="infoNav-containner">
      <div class="viewContent clearFix">
        <div class="contentLeft fL">
          <index-tree></index-tree>
        </div>
        <div class="contentRight fL">
          <history-table></history-table>
        </div>
      </div>
    </div>
    <historySearch v-if="searchDialogShow" @giveFalse="searchDialogReturn"></historySearch>
  </div>
</template>
<script>
  // import axios from 'axios'
  import returnnormalpress from '@/assets/equipv2/returnnormalpress.png'
  import history from '@/assets/messageCenter/history.png'
  import searchinvalid from '@/assets/equipv2/searchinvalid.png'
  import indexTree from './components/indexTree.vue'
  import historyTable from './components/historyTable.vue'
  import historySearch from './components/historySearch.vue'

  export default {
    components: {
      indexTree,
      historyTable,
      historySearch
    },
    data() {
      return {
        returnnormalpress,
        history,
        searchinvalid,
        seachContent: '历史告警',
        seachTitle: '暂无搜索条件',
        // 弹框
        searchDialogShow: false
      }
    },
    methods: {
      // 返回主页
      goBack() {
        this.$router.push({ path: '/message' })
      },
      // 搜索
      searchShow() {
        this.searchDialogShow = !this.searchDialogShow
      },
      // 父组件接收值
      searchDialogReturn(data) {
        this.searchDialogShow = data // data仅仅代表参数 这里等同于子组件roleDialogMask
        console.log('11')
        console.log(data)
      }
    }
  }
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
  .equipContainner {
    width: 100%;
    /*min-height: 53vw;*/
    background-color: #EFEFEF;
    .seachnav {
      width: 60%;
      height: 50px;
      position: fixed;
      z-index: 2;
      top: 0;
      bottom: 0;
      line-height: 50px;
      padding-left: 20px;
      .navHeight {
        width: 100px !important;
        height: 60px;
        padding-right: 0 !important;
        .returnnormalpress {
          display: inline-block;
          width: 20px;
          height: 20px;
          vertical-align: -webkit-baseline-middle;
          cursor: pointer;
          background-image: url('../../assets/equipv2/returnnormalpress.png');
        }
        .returnnormalpress:hover {
          background-image: url('../../assets/equipv2/returnHover.png');
        }
        .equiplist {
          vertical-align: -webkit-baseline-middle;
          margin-left: 15px;
        }
        .searchinvalid {
          display: inline-block;
          width: 20px;
          height: 20px;
          vertical-align: -webkit-baseline-middle;
          margin-left: 5px;
          background-image: url('../../assets/equipv2/searchHover.png');
          cursor: pointer;
        }
        .searchinvalid:hover {
          background-image: url('../../assets/equipv2/searchRealHover.png');
        }
      }
      .con {
        width: 450px;
        height: 60px;
        float: left;
        margin-right: 20px;
        line-height: 3px;
        padding-left: 0 !important;
        p{
          margin: 0;
          line-height: 60px;
        }
        .seachContent {
          font-size: 18px;
          font-family: MicrosoftYaHei;
          font-weight: 400;
          padding-top: 0px;
          color: rgba(51, 51, 51, 1);
        }
        .seachtitle {
          font-size: 12px;
          font-family: MicrosoftYaHei;
          font-weight: 400;
          color: rgba(102, 102, 102, 1);
        }
      }
    }
  }
  .infoNav-containner{
    width: 100%;
    height: 890px;
    margin: 29px 20px 0;
    font-size: 20px;
    color: #25B6C7;
    background-color: #EFEFEF;
    /*border: 1px solid red;*/
    .viewContent{
      width: 100%;
      height: 870px;
      /*border: 1px solid red;*/
      .contentLeft{
        overflow-y: auto;
        width: 345px;
      }
    }
  }
  /****************公共样式****************/
  .clearFix:after{
    display: block;
    content: '';
    clear: both;
  }
  .fL{
    float: left;
  }
  .fR{
    float: right;
  }
  /**************滚动条样式*******************/
  /deep/ .contentLeft::-webkit-scrollbar {/*滚动条整体样式*/
    width: 14px;     /*高宽分别对应横竖滚动条的尺寸*/
    height: 4px;
  }
  /deep/ .contentLeft::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
    /*border-radius: 5px;*/
    /*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
    background: #DDDDDD;
  }
  /deep/ .contentLeft::-webkit-scrollbar-track {/*滚动条里面轨道*/
    /*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
    border-radius: 0;
    background: #F5F5F5;
  }
</style>
